import {getWorldRatio} from './util.js'
// Some usefull iables
const people = {
  maxHealth : 10,
  maxFood : 10,
  handSize : 5,
  cardUid : 0,
  currentPlayingCard : null
}


// The consolidated state of our app
const state = {
// World
  worldRatio: getWorldRatio(),
  //game
  turn: 1,
  players: [
    {
      name: 'Anne of Cleves',
      food: 10,
      health: 10,
      skipTurn: false,
      skippedTurn: false,
      hand: [],
      lastPlayedCardId: null,
      dead: false,
    },
    {
      name: 'William the Bald',
      food: 10,
      health: 10,
      skipTurn: false,
      skippedTurn: false,
      hand: [],
      lastPlayedCardId: null,
      dead: false,
    },
  ],
  currentPlayerIndex: Math.round(Math.random()),
  testHand: [],
  activeOverlay: null,
  get currentPlayer() {
    return state.players[state.currentPlayerIndex]
  },
  get currentOpponentId() {
    return state.currentPlayerIndex === 0 ? 1: 0;
  },
  get currentOpponent() {
    return state.players[state.currentOpponentId]
  }
};
export {people, state}
